
// node 服务器配置
var server_config = {
    HOST: '0.0.0.0',
    PORT: 443
}

// mysql 配置
var mysql_config = {
    DB_HOST : 'kujijiku.com',
    // DB_NAME : 'mardan',
    // DB_USER : 'mardan',
    DB_NAME : 'forTest',
    DB_USER : 'forTest',
    DB_PASSWORD : '123456',
    DB_PORT : '3306'
}

// 生成token的key
json_web_token_key = '**123'

// redis 配置
var redis_config = {
    HOST: 'kujijiku.com',
    PORT: 6379,
    USER: "",
    PASSWORD: "123456",
    EXPIRE_TIME: 60*30
}

// 角色
var roles = {
    student: 'student',
    admin: 'admin',
    jiaoyan_teacher: 'jiaoyan_teacher',
    xingzheng_teacher: 'xingzheng_teacher',
    other_user: 'other_user',
    disabled_account: 'disabled_account'
}

// 校验page 和 size 参数
var has_page_and_size_parameter_urls = [
    '/admin/getLog',
    '/admin/student/getlist',
    '/general/year/list',
    '/general/topic/getlist',
    '/xingzheng/reaserchstudentlist',
    '/xingzheng/internship/studentlist',
    '/general/internship/list'
]

// 校验user_id
var has_user_id = [
    '/admin/student/getDetail',
    '/admin/teacher/getdetail',
    '/admin/teacher/update',
    '/admin/student/update'
]

// 通用接口，学生，教务，行政都可以用
var general_api = [
    '/student/getdetail',
    '/student/setdetail',  
    '/student/setpassword'
]



// nohup node server.js >> output.log 2>&1 &

module.exports.mysql_config = mysql_config
module.exports.json_web_token_key = json_web_token_key
module.exports.server_config = server_config
module.exports.redis_config = redis_config
module.exports.roles = roles
module.exports.has_page_and_size_parameter_urls = has_page_and_size_parameter_urls
module.exports.has_user_id = has_user_id
module.exports.general_api = general_api